<template>
  <div class="hello" id="mapContent"></div>
</template>


<script>
import mapApp from "@/plugins/index.js";
export default {
  name: "HelloWorld",
  data() {
    return {
      msg: "Welcome to Your Vue.js App",
    };
  },
  mounted() {
    window.mapApp = new mapApp("mapContent", {});
  },
  methods: {
    // 定位
    getdh(station) {
      window.mapApp.getTo(station);
    },

    getTos(r) {
      window.mapApp.getTos(r);
    },
    // 新增并且定位到这个实体
    getTo(id) {
      window.mapApp.getTo(id);
    },
    removeEntity(id) {
      window.mapApp.removeEntity(id);
    },
    showsupply(id) {
      window.mapApp.showsupply(id);
    },
    addEntity(e) {
      window.mapApp.addEntity(e);
    },
    hideSupply() {
      window.mapApp.hideSupply();
    },
    selectLineByName(name) {
      window.mapApp.selectLineByName(name);
    },
    flowPlay(name) {
      window.mapApp.flowPlay(name);

    },
    endPlay() {
       window.mapApp.endPlay(name);
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1,
h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
.hello {
  height: 100%;
}
</style>
